package com.bwie.controller;

import com.bwie.pojo.Order;
import com.bwie.service.OrderService;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/order/index")
public class IndexController {

    @Autowired
    OrderService orderService;

    @PostMapping("/getOrderList")
    public R getOrderList(@RequestBody PageInfoVo pageInfoVo){
        return orderService.getOrderList(pageInfoVo);
    }

    @PostMapping("/addList")
    public R addList(@RequestBody Order order){
        return orderService.addList(order);
    }

    @PostMapping("/getGoList")
    public R getGoList(@RequestBody PageInfoVo pageInfoVo){
        return orderService.getGoList(pageInfoVo);
    }
}
